<extend name="Public/base"/>

<block name="nav">


</block>



<block name="body">



    <div class="page-header">
        <h1>
           统计
        </h1>
    </div>


        <div class="table_list">
            <table class="table table-striped table-bordered table-hover table-responsive text-center" >


                <thead>

                <tr>
                    <th class="text-center" rowspan="2" colspan="2"></th>

                    <th class="text-center" colspan="{:count(F('Var_room_type'))+1}">房间</th>
                    <th class="text-center" colspan="3">房间使用情况</th>
                    <th class="text-center" colspan="3">人数</th>


                </tr>


                <tr>
                    <th class="text-center">合计</th>
                    <volist name=":F('Var_room_type')" id="v">
                        <th class="text-center"> {$v.name}</th>

                    </volist>


                    <th class="text-center">空房</th>
                    <th class="text-center">未住满</th>
                    <th class="text-center">住满</th>
                    <th class="text-center">可住</th>
                    <th class="text-center">现住</th>
                    <th class="text-center">剩余</th>


                </tr>
                </thead>
                <tbody>
                <volist name="_data" id="vo">

                    <volist name="vo.child" id="v">
                        <tr >

                            <if condition="$i eq 1">
                                <td width="100px" rowspan="{:count($vo['child'])+1}">{$vo.name}</td>
                            </if>
                            <td >{$v.name}</td>
                            <td >


                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" > {$v.room}    </a>

                                <br>

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$v.kong_room} </a>
                                /


                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>2))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$v.weiman_room} </a>

                                /

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>3))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$v.man_room} </a>



                            </td>

                            <volist name=":F('Var_room_type')" id="s">

                                <td class="text-center">

                                    <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" > <php> echo $v["room".$s["id"]];</php>   </a>

                                    <br>

                                    <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>1,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $v["kong_room".$s["id"]];</php></a>
                                    /


                                    <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>2,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $v["weiman_room".$s["id"]];</php> </a>

                                    /

                                    <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>3,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $v["man_room".$s["id"]];</php> </a>




                                   </td>

                            </volist>




                            <td >

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$v.kong_room} </a>



                            </td>
                            <td >
                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>2))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$v.weiman_room} </a>

                               </td>
                            <td >

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$v['id'],'status'=>3))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$v.man_room} </a>

                              </td>
                            <td >{$v.max_num}</td>
                            <td >
                                <a href="{:U('Tongji/users',array('ajax'=>1,'building'=>$v['id']))}"  class="newopen" data-width="1100px" data-height="630px" data-title="人员信息" >   {$v.room_user} </a>

                               </td>
                            <td >{$v.kong_chuang}</td>

                        </tr>


                    </volist>
                    <tr>

                        <td>合计</td>

                        <td >       <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" > {$vo.room}   </a>

                            <br>

                            <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$vo.kong_room} </a>



                     /
                            <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>2))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$vo.weiman_room} </a>

                 /

                            <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>3))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$vo.man_room} </a>



                        </td>
                        <volist name=":F('Var_room_type')" id="s">
                            <td class="text-center">

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $vo["room".$s["id"]];</php>  </a>
                                <br>

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>1,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $vo["kong_room".$s["id"]];</php></a>
                                /


                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>2,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $vo["weiman_room".$s["id"]];</php> </a>

                                /

                                <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>3,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $vo["man_room".$s["id"]];</php> </a>


                            </td>

                        </volist>

                        <td >

                            <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$vo.kong_room} </a>



                        </td>
                        <td >
                            <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>2))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$vo.weiman_room} </a>

                        </td>
                        <td >

                            <a href="{:U('Tongji/index',array('ajax'=>1,'building'=>$vo['id'],'status'=>3))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$vo.man_room} </a>

                        </td>
                        <td >{$vo.max_num}</td>
                        <td >
                            <a href="{:U('Tongji/users',array('ajax'=>1,'building'=>$vo['id']))}"  class="newopen" data-width="1100px" data-height="630px" data-title="人员信息" >   {$vo.room_user} </a>
                           </td>
                        <td >{$vo.kong_chuang}</td>

                    </tr>
                </volist>



                <tr>

                    <td colspan="2"> 合计</td>


                    <td >
                        <a href="{:U('Tongji/index',array('ajax'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.room}  </a>

                        <br>
                        <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.kong_room} </a>



                /
                        <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>2))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.weiman_room} </a>

                 /

                        <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>3))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.man_room} </a>


                      </td>
                    <volist name=":F('Var_room_type')" id="s">
                        <td class="text-center">
                            <a href="{:U('Tongji/index',array('ajax'=>1,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >  <php> echo $count["room".$s["id"]];</php> </a>


                            <br>
                            <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>1,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   <php> echo $count["kong_room".$s["id"]];</php> </a>



                            /
                            <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>2,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >  <php> echo $count["weiman_room".$s["id"]];</php></a>

                            /

                            <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>3,'type'=>$s['id']))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" > <php> echo $count["man_room".$s["id"]];</php> </a>




                            </td>

                    </volist>
                    <td >

                        <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>1))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.kong_room} </a>



                    </td>
                    <td >
                        <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>2))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.weiman_room} </a>

                    </td>
                    <td >

                        <a href="{:U('Tongji/index',array('ajax'=>1,'status'=>3))}"  class="newopen" data-width="1000px" data-height="630px" data-title="宿舍信息" >   {$count.man_room} </a>

                    </td>
                    <td >{$count.max_num}</td>

                    <td >
                        <a href="{:U('Tongji/users',array('ajax'=>1))}"  class="newopen" data-width="1100px" data-height="630px" data-title="人员信息" >   {$count.room_user} </a>
                    </td>


                    <td >{$count.kong_chuang}</td>

                </tr>
                </tbody>

            </table>
        </div>




</block>
<block name="script">
    <link rel="stylesheet" href="__JS__/artDialog/skins/default.css">
    <script src="__JS__/artDialog/artDialog.js"></script>
    <script src="__JS__/artDialog/iframeTools.js"></script>
    <script>


        $(function(){

            $(".newopen").click(function(){

                var s_width=$(this).data("width");
                var s_height=$(this).data("height");
                var s_title=$(this).data("title");

                href=$(this).attr("href");

                art.dialog.open(href, {
                    width: s_width,
                    height: s_height,
                    title: s_title

                }, false);

                return false;


            });






        })




    </script>

</block>

